package ws.jonas.sybosc.db;

import java.sql.DriverManager;
import java.sql.SQLException;
import java.util.Properties;

public class MssqlDb extends SqlDb {
	public MssqlDb(String host, String user, String password) throws SQLException {
		Properties props = new Properties();
		props.put("user", user);
		props.put("password", password);
		props.put("characterEncoding", "UTF-8");
		try {
			Class.forName("com.microsoft.sqlserver.jdbc.SQLServerDriver");
			conn = DriverManager.getConnection("jdbc:sqlserver://" + host, props);
		} catch (ClassNotFoundException e) {
			throw new SQLException("Bug in the code (this should not happend)", e);
		}

		prepareStatements();
	}
}
